Messages and Questions from patch

Contents|Index|Previous|Next

Messages and Questions from patch

patch can produce a variety of messages, especially if it has trouble decoding its input. In a few situations where it's not sure how to proceed, patch normally prompts you for more information from the keyboard. There are options to suppress printing non-fatal messages and stopping for keyboard input. The message 'Hmm...' indicates that patch is reading text in the patch file, attempting to determine whether there is a patch in that text, and if so, what kind of patch it is. You can inhibit all terminal output from patch, unless an error occurs, by using the '-s', '--quiet', or '--silent' option. There are two ways you can prevent patch from asking you any questions. The '-f' or'--force' option assumes that you know what you are doing. It assumes the following:

- skip patches that do not contain file names in their headers;
- patch files even though they have the wrong version for the 'Prereq:' line in the patch;
- assume that patches are not reversed even if they look like they are.

The '-t' or '--batch' option is similar to '-f', in that it suppresses questions, but it makes somewhat different assumptions:

- skip patches that do not contain file names in their headers (the same as '-f');
- skip patches for which the file has the wrong version for the 'Prereq:' line in the patch;
- assume that patches are reversed if they look like they are.

patch exits with a non-zero status if it creates any reject files. When applying a set of patches in a loop, you should check the exit status, so you don't apply a later patch to a partially patched file.